<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Change file ownership</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.eio-fchmod.html">eio_fchmod</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.eio-fdatasync.html">eio_fdatasync</a></div>
 <div class="up"><a href="ref.eio.html">Eio 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.eio-fchown" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">eio_fchown</h1>
  <p class="verinfo">(PECL eio &gt;= 0.0.1dev)</p><p class="refpurpose"><span class="refname">eio_fchown</span> &mdash; <span class="dc-title">Change file ownership</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.eio-fchown-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">resource</span> <span class="methodname"><strong>eio_fchown</strong></span>
    ( <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$fd</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$uid</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$gid</code><span class="initializer"> = -1</span></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$pri</code><span class="initializer"> = EIO_PRI_DEFAULT</span></span>
   [, <span class="methodparam"><span class="type"><a href="language.types.callable.html" class="type callable">callable</a></span> <code class="parameter">$callback</code><span class="initializer"> = NULL</span></span>
   [, <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$data</code><span class="initializer"> = NULL</span></span>
  ]]]] )</div>

  <p class="para rdfs-comment">
   <span class="function"><strong>eio_fchown()</strong></span> changes ownership of the file specified by
   <em><code class="parameter">fd</code></em> file descriptor.
  </p>

 </div>


 <div class="refsect1 parameters" id="refsect1-function.eio-fchown-parameters">
  <h3 class="title">参数</h3>
  <dl>

   
    <dt>
<em><code class="parameter">fd</code></em></dt>

    <dd>

     <p class="para">
     Stream, Socket resource, or numeric file descriptor.
     </p>
    </dd>

   
   
    <dt>
<em><code class="parameter">uid</code></em></dt>

    <dd>

     <p class="para">
     User ID. Is ignored when equal to -1.
     </p>
    </dd>

   
   
    <dt>
<em><code class="parameter">gid</code></em></dt>

    <dd>

     <p class="para">
     Group ID. Is ignored when equal to -1.
     </p>
    </dd>

   
   
    <dt>
<em><code class="parameter">pri</code></em></dt>

    <dd>

    <p class="para">请求的优先级：<strong><code>EIO_PRI_DEFAULT</code></strong>，<strong><code>EIO_PRI_MIN</code></strong>，<strong><code>EIO_PRI_MAX</code></strong> 或 <strong><code>NULL</code></strong>。如果是
<strong><code>NULL</code></strong>，<em><code class="parameter">pri</code></em> 将设为
<strong><code>EIO_PRI_DEFAULT</code></strong>。
</p>

    </dd>

   
   
    <dt>
<em><code class="parameter">callback</code></em></dt>

    <dd>

     <p class="para">
<em><code class="parameter">callback</code></em>
函数在请求完成时被调用。其应匹配一下原型：<div class="example-contents"><div class="phpcode"><code><span style="color: #000000">
void&nbsp;callback(mixed&nbsp;$data,&nbsp;int&nbsp;$result[,&nbsp;resource&nbsp;$req]);</span>
</code></div></div>

<dl>

 
  <dt>
<em><code class="parameter">data</code></em></dt>

  <dd>
<p class="para">传递给请求的用户数据。</p></dd>

 
 
  <dt>
<em><code class="parameter">result</code></em></dt>

  <dd>
<p class="para">针对请求的结果的值。通常是相应的系统调用返回的值。</p></dd>

 
 
  <dt>
<em><code class="parameter">req</code></em></dt>

  <dd>
<p class="para">可选的请求资源，可被 <span class="function"><a href="function.eio-get-last-error.html" class="function">eio_get_last_error()</a></span>
   之类的函数使用。</p></dd>

 
</dl>

</p>

    </dd>

   
   
    <dt>
<em><code class="parameter">data</code></em></dt>

    <dd>

     <p class="para">
     Arbitrary variable passed to <em><code class="parameter">callback</code></em>.
     </p>
    </dd>

   
  </dl>

 </div>


 <div class="refsect1 seealso" id="refsect1-function.eio-fchown-seealso">
  <h3 class="title">参见</h3>
  <ul class="simplelist">
   <li class="member">eio_fchmod</li>
  </ul>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.eio-fchmod.html">eio_fchmod</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.eio-fdatasync.html">eio_fdatasync</a></div>
 <div class="up"><a href="ref.eio.html">Eio 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
